--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 37edfa4cfe5aa2f6ebb7e4aeac2e2c67ad181a52
Parents : 64a39a5
Author : Ivan <e46112d44649266d71fe2193e00a4710>
Signature : T66BB85Valid, signed by author
Date : 2026-07-26T08:57:56-05:00
feat: add ALTCHA challenge schema and integrate it into HTTP API response registry
Changes
4 files changed, 37 insertions(+), 4 deletions(-)
Diff
diff --git a/meshchatx.rsm b/meshchatx.rsm
index 5072622a..f50fe453 100644
Binary files a/meshchatx.rsm and b/meshchatx.rsm differ
diff --git a/tests/backend/api_json_contract_schemas.py b/tests/backend/api_json_contract_schemas.py
index 2afbea69..1b701722 100644
--- a/tests/backend/api_json_contract_schemas.py
+++ b/tests/backend/api_json_contract_schemas.py
@@ -351,6 +351,23 @@ AUTH_STATUS_SCHEMA: dict = {
"additionalProperties": False,
}
+ALTCHA_CHALLENGE_SCHEMA: dict = {
+ "type": "object",
+ "required": ["parameters", "signature"],
+ "properties": {
+ "parameters": {
+ "type": "object",
+ "required": ["algorithm"],
+ "properties": {
+ "algorithm": {"type": "string"},
+ },
+ "additionalProperties": True,
+ },
+ "signature": {"type": "string"},
+ },
+ "additionalProperties": True,
+}
+
TELEPHONE_VOICEMAIL_STATUS_SCHEMA: dict = {
"type": "object",
"required": [
diff --git a/tests/backend/http_api_response_registry.py b/tests/backend/http_api_response_registry.py
index 2af5a4e2..d40039fd 100644
--- a/tests/backend/http_api_response_registry.py
+++ b/tests/backend/http_api_response_registry.py
@@ -7,6 +7,7 @@ from __future__ import annotations
import re
from tests.backend.api_json_contract_schemas import (
+ ALTCHA_CHALLENGE_SCHEMA,
API_V1_APP_INFO_ENVELOPE_SCHEMA,
API_V1_STATUS_SCHEMA,
AUTH_STATUS_SCHEMA,
@@ -143,6 +144,13 @@ HTTP_JSON_GET_CONTRACTS: tuple[HttpJsonContract, ...] = (
HttpJsonContract("GET", "/api/v1/app/changelog", CHANGELOG_SCHEMA),
HttpJsonContract("GET", "/api/v1/auth/status", AUTH_STATUS_SCHEMA),
HttpJsonContract("GET", "/api/v1/auth/csrf", CSRF_ENVELOPE_SCHEMA),
+ HttpJsonContract(
+ "GET",
+ "/api/v1/auth/altcha/challenge",
+ ALTCHA_CHALLENGE_SCHEMA,
+ allow_statuses=(200, 404, 503),
+ alt_schemas=(ERROR_ENVELOPE_SCHEMA,),
+ ),
HttpJsonContract("GET", "/api/v1/server/security", SERVER_SECURITY_SCHEMA),
HttpJsonContract("GET", "/api/v1/config", CONFIG_ENVELOPE_SCHEMA),
HttpJsonContract(
diff --git a/tests/backend/test_landlock_integration_surfaces.py b/tests/backend/test_landlock_integration_surfaces.py
index fb12c299..2fe9dd5c 100644
--- a/tests/backend/test_landlock_integration_surfaces.py
+++ b/tests/backend/test_landlock_integration_surfaces.py
@@ -291,14 +291,22 @@ def test_landlock_user_local_bin_script_executable(tmp_path):
local_bin = os.path.join(os.path.expanduser("~"), ".local", "bin")
if not os.path.isdir(local_bin):
pytest.skip("~/.local/bin not present")
- preferred = ("argospm", "argos-translate", "argostranslate", "git-remote-rns")
+ # Pipx-style CLIs only. git-remote-rns imports RNS at startup and is not a
+ # generic --help smoke target for Landlock execute permission.
+ preferred = (
+ ("argospm", ["--help"]),
+ ("argos-translate", ["--help"]),
+ ("argostranslate", ["--help"]),
+ )
cmd = None
- for name in preferred:
+ cmd_argv = None
+ for name, extra_argv in preferred:
path = os.path.join(local_bin, name)
if os.path.isfile(path) and os.access(path, os.X_OK):
cmd = path
+ cmd_argv = [path, *extra_argv]
break
- if cmd is None:
+ if cmd is None or cmd_argv is None:
pytest.skip("no known pipx-style CLI in ~/.local/bin")
storage = tmp_path / "storage"
storage.mkdir()
@@ -308,7 +316,7 @@ def test_landlock_user_local_bin_script_executable(tmp_path):
import sys
proc = subprocess.run(
- [{cmd!r}],
+ {cmd_argv!r},
capture_output=True,
text=True,
timeout=10,
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────